﻿using System;
using System.IO;

namespace OpenLS.Spreadsheet.Formats.Biff.OfficeArt
{
    internal class OfficeArtChildAnchor : OfficeArtRecord
    {
        private int xLeft;
        private int xRight;
        private int yBottom;
        private int yTop;

        public override RecType RecordType
        {
            get { return RecType.OfficeArtChildAnchor; }
        }

        

        protected override void ReadNoHeader(OfficeArtReadContext context)
        {
            xLeft = context.ReadInt32();
            yTop = context.ReadInt32();
            xRight = context.ReadInt32();
            yBottom = context.ReadInt32();
        }

        protected override byte Version
        {
            get { return 0x0; }
        }

        protected override int ByteLength
        {
            get { return 4*4; }
        }


        protected override void WriteNoHeader(OfficeArtWriteContext context)
        {
            context.Write(xLeft);
            context.Write(yTop);
            context.Write(xRight);
            context.Write(yBottom);
        }

    }
}